#ifndef QSPECTROGRAMDRAWING_H_ACF6F8DE_72C9_499C_B30C_A451690C15A0
#define QSPECTROGRAMDRAWING_H_ACF6F8DE_72C9_499C_B30C_A451690C15A0

#include "AudioUtils_global.h"

#include <QColor>

class QPainter;
class QRect;

namespace AudioUtils {

class QAudioReader;
class QAudioFormat;

class AUDIOUTILS_EXPORT QSpectrogramDrawing
{
public:
	QSpectrogramDrawing();
	~QSpectrogramDrawing();

public:
	void draw(
		QPainter& painter,
		QAudioFormat& format,
		QAudioReader& reader, 
		const QRect& rect
		);

	void draw(
		QPainter& painter,
		QAudioFormat& format,
		QAudioReader& reader,
		const QRect& rect,
		quint64 startSample,
		quint64 stopSample
		);

	void draw(
		QPainter& painter,
		QAudioFormat& format,
		QAudioReader& reader,
		const QRect& rect,
		double startSeconds,
		double stopSeconds
		);

private:
	void draw(
		QPainter& painter,
		QAudioFormat& format,
		QAudioReader& reader,
		const QRect& rect,
		quint64 startSample,
		quint64 stopSample,
		int channel // 0: left 1: right
		);
};

}

#endif // QSPECTROGRAMDRAWING_H_ACF6F8DE_72C9_499C_B30C_A451690C15A0

